package com.zbkj.admin.controller.merchant;

import com.zbkj.common.page.CommonPage;
import com.zbkj.common.request.BrandNameSearchRequest;
import com.zbkj.common.request.BrandSearchRequest;
import com.zbkj.common.request.PageParamRequest;
import com.zbkj.common.response.BrandNameResponse;
import com.zbkj.common.response.BrandResponse;
import com.zbkj.common.result.CommonResult;
import com.zbkj.service.service.BrandService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;


/**
 * 品牌商管理表 前端控制器
 +----------------------------------------------------------------------
 */
@Slf4j
@RestController
@RequestMapping("api/admin/merchant/brand/basic")
@Api(tags = "商户下品牌商信息")
public class MerchantBrandBasicController {

    @Autowired
    private BrandService brandService;

    @ApiOperation(value = "根据推广链接获取品牌商名称")
    @RequestMapping(value = "/name", method = RequestMethod.POST)
    public CommonResult<BrandNameResponse> name(@RequestBody @Validated BrandNameSearchRequest request){
        return CommonResult.success(brandService.getName(request));
    }

}



